package dao.v2;

import org.apache.ibatis.annotations.Param;

import model.LogBuyCashVO;
import model.LogEarnVO;
import model.LogPackageVO;
import model.LogTicketVO;
import model.OrderPayVO;
import model.OrderRefund;
import model.PackagePayVO;

public interface PayVOMapper {

	String genPayOrder(@Param("type")int type, @Param("free_cash")String free_cash, @Param("remark")String remark, @Param("pay_type")int pay_type, @Param("member_id")String member_id);

	OrderPayVO getPayOrderByNo(String out_trade_no);

	int subFreeCash(@Param("member_id")String member_id, @Param("price")double price);

	void insertCashOutLog6(@Param("member_id")String member_id, @Param("price")double price, @Param("ticket")String ticket,@Param("rate") String rate, @Param("country") String country);

	int insertMemberTicket(@Param("member_id")String member_id, @Param("ticket")String ticket,@Param("rate") String rate, @Param("partner_level") String partner_level);

	void insertTicketInLog(@Param("member_id")String member_id, @Param("ticket")String ticket,@Param("rate") String rate,@Param("pay_type")  int pay_type, @Param("payVO") OrderPayVO payVO, @Param("logTicketVO") LogTicketVO logTicketVO, @Param("country") String country);

	void updatePayOrderParams(@Param("no")String no, @Param("params")String jsonString);

	void updatePayOrderState(OrderPayVO payVO);

	void addHistoryTotalTicket(@Param("member_id")String member_id, @Param("ticket")String ticket);

	void checkAndUpdateMemberLevel(String member_id);
	
	void updOrderAfterPay(@Param("state")String state, @Param("pay_type")String pay_type, @Param("conn_pay_id")String conn_pay_id, @Param("order_id_List")String[] order_id_list);

	void updatePayOrderState1(@Param("state")String state, @Param("id")String id);
	
	void delOrderTimer(@Param("order_id_List")String[] order_id_list);
	
	OrderRefund getOrderRefundBy(String refund_id);
	
	LogPackageVO getLogPackageById(String id);
	
	LogPackageVO getLogPackageByNo(String no);
	
	void updLogPackage(LogPackageVO packageLog);
	
	int getToTalPackageTicket(String package_id);
	
	void addLogEarn(LogEarnVO log);
	
	void addLogBuyCash(LogBuyCashVO log);
	
	int  getToTalPackageAward(String package_id);
	
	int chetckOrderState(@Param("order_id_List")String[] order_id_list);
	
	void addPackagePay(PackagePayVO packPay);
	
	PackagePayVO getPackagePay(String id);
	
	PackagePayVO getPackagePayByNo(String no);

	int updateOrderPayFinish(OrderPayVO payVO);

	String getLogticketNoById(LogTicketVO logTicketVO);
	
	String getOpenId(String member_id);
	
	int checkPackage(@Param("package_id")String package_id,@Param("standard_id")String standard_id);
	
	int updMemberLevel(@Param("member_id")String member_id, @Param("vip_level")String vip_level, @Param("level")String level, @Param("primary_level") String primary_level);

	void saveMembeLevelLogs(@Param("member_id")String member_id,@Param("from_level")String from_level,@Param("to_level")String to_level);
	
    void updTest();
    
    String getTest();

	Object getPushOpenId(String member_id);

	void updateExp(@Param("member_id") String member_id, @Param("common_level") String common_level);

	int subFreeCashEn(@Param("member_id") String member_id, @Param("price") double price);

	void updatePayKey(@Param("no") String no, @Param("pay_key") String pay_key);
	
}
